package com.chenshu.mybatis_demo.controller;

import com.chenshu.mybatis_demo.model.UserInfo;
import com.chenshu.mybatis_demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-04-16
 * Time：02:38
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/getall")
    public List<UserInfo> getUsers() {
        return userService.getAll();
    }
}
